﻿namespace CarShop.Security.Contracts.Exceptions
{
    public class UserValidationException : MembershipProviderException
    {
        private const string DefaultMessage = "Provided credentials are invalid.";

        private readonly ValidationFaultReason _faultReason;

        public UserValidationException(ValidationFaultReason faultReason)
            : base(DefaultMessage)
        {
            _faultReason = faultReason;
        }

        public ValidationFaultReason FaultReason
        {
            get { return _faultReason; }
        }
    }

    public enum ValidationFaultReason
    {
        UserNotFound,
        InvalidPassword
    }
}
